/**
 * Copyright ©2003~2019年10月6日 szkingdom
 * @author raohj
 * @date 2019年10月6日
 * @file RCp_info.java
 * @comment : please input your comment to this file
 * @version : input version
 * @modify:
 * 		1、 2019年10月6日 由 raohj 新建文件
 */
package com.ccnu.demojava.jvm.classparse;

/**
 * @author raohj
 * @date 2019年10月6日
 * @version 
 * @comment to add your comment
 * cp_info {
    u1 tag;
    u1 info[];
}
Table 4.4-A. Constant pool tags (by section)
Constant Kind	Tag	Section
CONSTANT_Class	7	§4.4.1
CONSTANT_Fieldref	9	§4.4.2
CONSTANT_Methodref	10	§4.4.2
CONSTANT_InterfaceMethodref	11	§4.4.2
CONSTANT_String	8	§4.4.3
CONSTANT_Integer	3	§4.4.4
CONSTANT_Float	4	§4.4.4
CONSTANT_Long	5	§4.4.5
CONSTANT_Double	6	§4.4.5
CONSTANT_NameAndType	12	§4.4.6
CONSTANT_Utf8	1	§4.4.7
CONSTANT_MethodHandle	15	§4.4.8
CONSTANT_MethodType	16	§4.4.9
CONSTANT_Dynamic	17	§4.4.10
CONSTANT_InvokeDynamic	18	§4.4.10
CONSTANT_Module	19	§4.4.11
CONSTANT_Package	20	§4.4.12
 */
/**
 * @author raohj
 * @date 2019年10月6日
 * @version 
 * @comment to add your comment
 * 参考：https://docs.oracle.com/javase/specs/jvms/se13/html/jvms-4.html#jvms-4.1
 */
public class RCS_cp_info {
	private byte tag;
	private Object info;
	public byte getTag() {
		return tag;
	}
	public void setTag(byte tag) {
		this.tag = tag;
	}
	public Object getInfo() {
		return info;
	}
	public void setInfo(Object info) {
		this.info = info;
	}
	public static class Constant_Class_Info{
		public short name_index;
	}
	public static class Constant_Fieldref_Info{
		public short class_index;
		public short name_and_type_index;
	}
	public static class Constant_Methodref_Info{
		public short class_index;
		public short name_and_type_index;
	}
	public static class Constant_InterfaceMethodref_Info{
		public short class_index;
		public short name_and_type_index;
	}		
	public static class Constant_String_Info{
		public short string_index;
	}
	public static class Constant_Integer_Info{
		public int value;
	}		
	public static class Constant_Float_Info{
		public float value;
	}		
	public static class Constant_Long_Info{
		public Long value;
	}			
	public static class Constant_Double_Info{
		public double value;
	}		
	public static class Constant_NameAndType_Info{
		public short name_index;
		public short descriptor_index;
	}
	public static class Constant_Utf8_Info{
		public short len;
		public byte[] bytes;	// len
	}
	public static class Constant_MethodHandle_Info{
		public byte reference_kind;
		public short reference_index;
	}
	public static class Constant_MethodType_Info{
		public short descriptor_index;
	}
	public static class CONSTANT_Dynamic_info {
		public short bootstrap_method_attr_index;
		public short name_and_type_index;
	}
	public static class Constant_InvokeDynamic_Info{
		public short bootstrap_method_attr_index;
		public short name_and_type_index;
	}
	public static class CONSTANT_Module_info {
		public short name_index;
	}
	public static class CONSTANT_Package_info {
		public short name_index;
	}	
}
